<?php
//Hàm connect
$host="localhost";
$user="root";
$pass="";
$dbname="qlhoithao";
$nienkhoa="2014-2015";
$options=array(
       PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"
);
$dsn="mysql:host=$host;dbname=$dbname";
try {
       $db=@new PDO($dsn, $user, $pass, $options);
}
catch (PDOException $e)
{
echo "Lỗi kết nối: .$e->getMessage()";
};
?>